import request from '@/utils/request'

// 查询占位计费规则列表
export function listPrice(query) {
  return request({
    url: '/business/price/list',
    method: 'get',
    params: query
  })
}

// 查询占位计费规则详细
export function getPrice(id) {
  return request({
    url: '/business/price/' + id,
    method: 'get'
  })
}

// 新增占位计费规则
export function addPrice(data) {
  return request({
    url: '/business/price',
    method: 'post',
    data: data
  })
}

// 修改占位计费规则
export function updatePrice(data) {
  return request({
    url: '/business/price',
    method: 'put',
    data: data
  })
}

// 删除占位计费规则
export function delPrice(id) {
  return request({
    url: '/business/price/' + id,
    method: 'delete'
  })
}

// 查询场站下所有地锁
export function getDeviceAll() {
  return request({
    url: '/business/station/parkLock/list' ,
    method: 'get'
  })
}

// 地锁绑定计费模型
export function saveParkingPrice(data) {
  return request({
    url: '/business/parkinglock/saveParkingPrice',
    method: 'post',
    data: data
  })
}

export function listPriceAll() {
  return request({
    url: '/business/price/all/list' ,
    method: 'get'
  })
}

